package com.gqz.defect.enumEntity;

public enum CodeEnum {
    QX("1", "缺陷"),
    YH("2", "隐患");
    /**
     *
     */
    private String code;
    /**
     *
     */
    private String value;

    CodeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return this.code;
    }

    public String getValue() {
        return this.value;
    }

    public static String getValue(String code) {
        for (CodeEnum appraiseEnum : CodeEnum.values()) {
            if (appraiseEnum.getCode().equals(code)) {
                return appraiseEnum.getValue();
            }
        }
        return code;
    }
}
